#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int Fac(int m)
{
	if (m <= 1)
		return 1;
	else
		return m * Fac(m - 1);
}
int main()
{
	int n = 0;
	scanf("%d", &n);

	int ret = Fac(n);
	printf("%d\n", ret);
	return 0;
}